/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ixj.online.xml;

import ixj.online.process.Customer;

/**
 *
 * @author Administrator
 */
public class CustomerXMLIOProcessTest {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        final String customerFolder = "data/customers/";

        //
        Customer customer = new Customer();
        customer.setFirstName("Henry");
        customer.setEmail("henry@gmail.com");


        CustomerXMLIOProcess customerXMLIOProcess = new CustomerXMLIOProcess(customerFolder);
        boolean result = customerXMLIOProcess.save(customer);
        String msg = result ? "Saving success" : "Fail";
        System.out.println(msg);

        System.out.println("Number of customer: " + customerXMLIOProcess.count());
    }
}
